package com.chanceit.ssss.button;

import org.gl.GlobalVariable;
import org.gl.utils.lg;

import android.app.Activity;
import android.view.View;

import com.chanceit.ssss.activity.R;
import com.chanceit.ssss.common.ActivityActionName;
import com.chanceit.ssss.common.IntentExtraDataKey;

public class GoSearchOnClickImp implements View.OnClickListener {
	Activity activity;

	public GoSearchOnClickImp(Activity activity) {
		this.activity = activity;
	}

	@Override
	public void onClick(View v) {
		if (v.getId()==R.id.orderReceive) {
			GlobalVariable.getGlobalInstance().intent.putExtra(
					IntentExtraDataKey.SEARCHOFTYPE, IntentExtraDataKey.SEARCHOFTYPE_GO_PEOJECT);
			lg.e("GoSearchOnClickImp", ""+GlobalVariable.getGlobalInstance().intent.hashCode());
		}else{
//			GlobalVariable.getGlobalInstance().intent.putExtra(IntentExtraDataKey.CARER_SELECT_PAGE, 0);//清楚点这个状态
		}
		activity.startActivityForResult(GlobalVariable.getGlobalInstance().intent
				.setAction(ActivityActionName.SEARCH), IntentExtraDataKey.FOR_RESULT_SEARCHID);
	}
}
